package com.lizhenhua.api.controller;

import com.lizhenhua.api.service.UserLoginService;
import com.lizhenhua.fmmall.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin // 跨域
@RequestMapping("/user")
public class UserLoginController {
    @Autowired
    private UserLoginService userLoginService;

    @GetMapping("/login")
    public ResultVo login(@RequestParam("username") String userName, @RequestParam("pwd") String pwd) {
        // 1. 调用user-check服务
        ResultVo resultVo = userLoginService.checkLogin(userName, pwd);
        return resultVo;
    }

}
